require 'rubygems'
require 'mysql2'

module Crud
  def Crud.insert(info, contacts, price, date, table_name)
      client = Mysql2::Client.new(:host => "localhost", :username => "root", :password => "zxc1", :database => "estate");
      client.query(
              "INSERT INTO #{table_name} (info, contacts, price, date)
                  VALUES ('#{info}', '#{contacts}', #{price}, '#{date}')");
      puts "Row has been added"
end

  def Crud.delete()
    # ...
  end

  def  Crud.update()
    # ...
  end
end
